-
Notifications
You must be signed in to change notification settings - Fork 126
Fix already used OAuth callback port handling to prevent "Invalid redirect URI" errors #2121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2121 +/- ##
==========================================
+ Coverage 48.71% 48.76% +0.05%
==========================================
Files 241 241
Lines 30594 30630 +36
==========================================
+ Hits 14903 14938 +35
+ Misses 14568 14562 -6
- Partials 1123 1130 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@claude could you review this with a security hat on |
Claude finished @ChrisJBurns's task —— View job Security ReviewI've completed a security-focused review of the OAuth callback port handling changes. Here are my findings: ✅ Positive Security Aspects
|
Problem
Users were experiencing "Invalid redirect URI" errors during OAuth authentication when the specified callback port was unavailable. The issue occurred because:
Solution
This PR implements a comprehensive fix for OAuth callback port handling:
🔧 Core Changes
🧪 Testing
PerformOAuthFlow
covering all port scenariosFindOrUsePortStrict
function and related tests📋 Behavior Summary
🎯 Benefits
thv proxy
andthv run
commandsTesting
Breaking Changes
None. This is a bug fix that improves existing behavior without changing APIs.
Related Issues
Fixes the "Invalid redirect URI" error reported by users during OAuth authentication flows.
fixes #2098